﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CS322_V3
{
    public partial class FormSabiranje : Form
    {
        public FormSabiranje()
        {
            InitializeComponent();
        }



        private void btnSaberi_Click(object sender, EventArgs e)
        {
            Double zbir = 0;
            lblErrorMessage.Visible = false;

            try
            {

                zbir = (Convert.ToDouble(txtSabirak1.Text) + Convert.ToDouble(txtSabirak2.Text) + Convert.ToDouble(txtSabirak3.Text));
                txtZbir.Text = Convert.ToString(zbir);
            }
            catch (Exception ex)
            {
                lblErrorMessage.Text = ex.Message;
                lblErrorMessage.Visible = true;
            }
        }
    }
}